FORM FRM_DISPLAY.
    perform FRM_LAYOUT.
    perform FRM_FIELDCAT.
    perform FRM_OUTPUT.
ENDFORM.

FORM FRM_LAYOUT.
    gs_layout-zebra = 'X'.
    gs_layout-cwidth_opt = 'X'.
    gs_layout-box_fname = 'CHECK'.
    gs_layout-sel_mode = 'A'.
ENDFORM.

DEFINE INIT_FIELDCAT.
    CLEAR GS_FIELDCAT.
    GS_FIELDCAT-fieldname = &1.
    GS_FIELDCAT-coltext = &2.
    APPEND GS_FIELDCAT TO GT_FIELDCAT.
END-OF-DEFINITION.

FORM FRM_FIELDCAT.
INIT_FIELDCAT '' ''.
ENDFORM.

FORM FRM_OUTPUT.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = 'ALV_STATUS'
    I_CALLBACK_USER_COMMAND = 'ALV_COMMAND'
    IS_LAYOUT_LVC = gs_layout
    IT_FIELDCAT_LVC = GT_FIELDCAT
    TABLES
    T_OUTTAB = GT_ALV_DATA
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
ENDFORM.

FORM ALV_STATUS USING RT_EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'STANDARD_FULLSCREEN'.
ENDFORM.

FORM ALV_COMMAND USING PV_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
DATA: LV_INDEX TYPE SY-TABIX.
DATA: LOB_GRID TYPE REF TO CL_GUI_ALV_GRID.

CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
E_GRID = LOB_GRID.

CALL METHOD LOB_GRID->CHECK_CHANGED_DATA.
RS_SELFIELD-REFRESH = 'X'.
RS_SELFIELD-COL_STABLE = 'X'.
RS_SELFIELD-ROW_STABLE = 'X'.

CASE PV_UCOMM.
    WHEN 'IMPORT'.
        perform DATA_PROCESS.
ENDCASE.
RS_SELFIELD-REFRESH = 'X'.
CALL METHOD LOB_GRID->REFRESH_TABLE_DISPLAY.
ENDFORM.